<template>
  <div>
    <el-row style="margin-top: 30px">
      <el-col v-for="(item,index) in list" :key="item.uuid" :span="2">
        <div>
          <el-image :src="item.photo" class="photoW"></el-image>
          <p @click="handleClick(item.uuid)" class="name_color">{{index+1}}、{{item.name}}</p>
          <p>{{item.birthday.substring(0, 7)}}生</p>
          <p>{{item.birthplace}}</p>
          <p>{{item.origin}}人</p>
          <p>{{item.workDay.substring(0, 7)}}参加工作</p>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import WeButton from '@/components/WeButton'
import WePagination from '@/components/WePagination'
import { parseTree } from '@/utils/util'
import { getAction, postAction, deleteAction } from '@/api/manage'
import {baseStaff} from "@/api/apiUrl";
export default {
  components: {
    WeButton,
    WePagination
  },
  data () {
    return {
      pagination: {
        total: 10, // 总数据条数
        pageSize: 10, // 每页条数
        pageNum: 1 // 当前页
      }, // 列表分页数据
      list: []
    }
  },
  created () {
    this.getList()
  },
  methods: {
    async getList () {
      const res = await postAction(baseStaff.selectAllPhotoBaseStaff, {
        page: 1,
        size:99999
      })
      if (res.code === 200) {
        this.list = res.data
        // this.pagerConfig.total = result.data.total
      }
    },
    handleClick (uuid) {
      this.$router.push({
        path: '/personnel_management/personnel_management/base_information',
        query: {
          uuid: uuid
        }
      })
    }
  }
}
</script>

<style scoped>
html, body, div {
  font-size: 14px;
}
p {
  font-size: 12px;
  margin-bottom: 10px;
}
.photoW {
  width: 125px;
  height: 168px;
}
.name_color {
  color: rgba(2, 151, 215, 0.847058823529412);
  cursor: pointer;
}
</style>
